package com.bupt.ilink.mapper.innovationPlaza;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.bupt.ilink.entity.innovationPlaza.ProjectConnectImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigInteger;
import java.util.List;

@Mapper
public interface ProjectConnectImageMapper extends BaseMapper<ProjectConnectImage> {
    @Select("SELECT ipi.image " +
            "FROM project_connect_image pci " +
            "JOIN innovationPlaza_image ipi ON pci.image_id = ipi.image_id " +
            "WHERE pci.project_id = #{projectId}")
    List<String> getImagesByProjectId(Long projectId);

    // 根据 projectId 获取所有关联的 imageId
    @Select("SELECT image_id FROM project_connect_image WHERE project_id = #{projectId}")
    List<Long> getImageIdsByProjectId(Long projectId);
}
